Skip to content

consomme: ipv6 address discoverability updates#3701

Merged
OneBlue merged 2 commits into
microsoft:mainfrom
Brian-Perkins:consomme_ipv6_address_discovery
Jun 19, 2026
Merged

consomme: ipv6 address discoverability updates#3701
OneBlue merged 2 commits into
microsoft:mainfrom
Brian-Perkins:consomme_ipv6_address_discovery

Conversation

@Brian-Perkins

@Brian-Perkins Brian-Perkins commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Consomme updates to expand ipv6 address discovery from the guest.

Adapter can be marked to not advertise routable address availability if traffic on that adapter is only going to be used for local/loopback traffic.

Infer Ipv6 link local address from routable address if the link local address is not yet known and the routable address conforms to a EUI-64 address derived from the guest MAC.

Discover the link local address from sent packets, similar to the routable address.

Additional tracing.

@Brian-Perkins Brian-Perkins requested a review from a team as a code owner June 9, 2026 16:56
Copilot AI review requested due to automatic review settings June 9, 2026 16:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the net_consomme device’s IPv6 address discovery and NDP behavior to improve guest IPv6 address “learnability” and to optionally suppress advertising a routable SLAAC prefix on adapters intended for local/loopback-only traffic.

Changes:

  • Add advertise_routable_ipv6 to control whether Router Advertisements include Prefix Information for SLAAC-based routable address creation.
  • Improve guest IPv6 address discovery by learning the guest’s link-local address from traffic and inferring link-local from a learned routable EUI-64-based SLAAC address.
  • Add more detailed ICMPv6/NDP tracing and a dedicated UnsupportedIcmpv6 drop reason for non-NDP ICMPv6.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
vm/devices/net/net_consomme/src/lib.rs Treat UnsupportedIcmpv6 drops as “unknown” TX results in queue stats.
vm/devices/net/net_consomme/consomme/src/ndp.rs Add NDP receive tracing and gate RA prefix advertisement on advertise_routable_ipv6.
vm/devices/net/net_consomme/consomme/src/lib.rs Introduce advertise_routable_ipv6, link-local inference from routable EUI-64, link-local learning from traffic, and UnsupportedIcmpv6.

Comment thread vm/devices/net/net_consomme/consomme/src/lib.rs Outdated
Comment thread vm/devices/net/net_consomme/consomme/src/lib.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment on lines 979 to +983
// Check if this is an NDP packet
let icmpv6_packet = Icmpv6Packet::new_unchecked(inner);
let msg_type = icmpv6_packet.msg_type();

if msg_type == smoltcp::wire::Icmpv6Message::NeighborSolicit
|| msg_type == smoltcp::wire::Icmpv6Message::NeighborAdvert
|| msg_type == smoltcp::wire::Icmpv6Message::RouterSolicit
|| msg_type == smoltcp::wire::Icmpv6Message::RouterAdvert
{
if msg_type.is_ndisc() {
Comment on lines 84 to +92
let icmpv6_packet = Icmpv6Packet::new_unchecked(payload);
let msg_type = icmpv6_packet.msg_type();
tracing::trace!(
icmpv6_type = %msg_type,
ipv6_src_addr = %ipv6_src_addr,
eth_src_addr = %frame.src_addr,
eth_dst_addr = %frame.dst_addr,
"received NDP message"
);
@@ -143,6 +144,10 @@
/// Current IPv6 network mask (if any).
#[inspect(display)]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

pub prefix_len_ipv6: u8,
/// If true, advertise an autonomous IPv6 prefix so guests create a
/// routable IPv6 address with SLAAC.
#[inspect(display)]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

pub udp_timeout: Duration,
/// If true, skip checks for host IPv6 support and assume the host has a
/// routable IPv6 address.
#[inspect(display)]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

#[inspect(with = "|x| x.map(inspect::AsDisplay)")]
pub client_ip_ipv6_routable: Option<Ipv6Address>,
/// Idle timeout for UDP connections.
#[inspect(debug)]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

@jstarks jstarks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix inspect now or in a follow up, please.

@OneBlue OneBlue merged commit 3f978bd into microsoft:main Jun 19, 2026
67 checks passed
damanm24 added a commit that referenced this pull request Jun 19, 2026
Addressing follow-ups requested in #3701

Co-authored-by: Daman Mulye <dmulye2@illinois.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants